package com.greenantmall.bean;

import com.avos.avoscloud.AVClassName;
import com.avos.avoscloud.AVObject;
import com.avos.avoscloud.AVRelation;
/**
 * 商品小分类
 * @author minfanfu
 * @since 3.8
 */
@AVClassName(AntAVObject.CLASS_GOODS_SYTLES)
public class GoodsStyles extends AntAVObject {
	
	public static final String ATTR_NAME ="name";
	public static final String ATTR_SHOWINDEX ="showIndex";
	public static final String ATTR_SECTIONNUM ="sectionNum";
	public static final String ATTR_USERSTYLE ="userStyle";
	public static final String ATTR_UPTOWNS ="uptowns";
	
	public String getName()
	{
		return this.getString(ATTR_NAME);
	}
	public void setName(String name)
	{
		this.put(ATTR_NAME,name);
	}
	
	public int getShowIndex()
	{
		return this.getInt(ATTR_SHOWINDEX);
	}
	public void setShowIndex(int count)
	{
		this.put(ATTR_SHOWINDEX,count);
	}
	
	public int getSectionNum()
    {
        return this.getInt(ATTR_SECTIONNUM);
    }
    public void setSectionNum(int count)
    {
        this.put(ATTR_SECTIONNUM,count);
    }
    
    public String getUserStyle()
    {
        return this.getString(ATTR_USERSTYLE);
    }
    public void setUserStyle(int count)
    {
        this.put(ATTR_USERSTYLE,count);
    }
    
	
	public AVRelation<ServerSection> getServerRelation()
	{
		return this.getRelation(ATTR_UPTOWNS);
	}
	public void removeFromServerRelation(ServerSection goods)
	{		
		this.getRelation(ATTR_UPTOWNS).remove(goods);
	}
	
}
